package test.lambda;

import java.util.Arrays;

@FunctionalInterface
interface FunctionalInterfaceWithStaticMethod {

    void apply();

    static int sum(int[] array) {
        return Arrays.stream(array).reduce((a, b) -> a + b).getAsInt();
    }

}

public class StaticMethodFunctionalInterface {
    public static void main(String[] args) {
        int sum = FunctionalInterfaceWithStaticMethod.sum(new int[]{1, 2, 3, 4, 5});

        FunctionalInterfaceWithStaticMethod f = () -> {};
    }
}
